﻿#pragma once
#include "SCustomCurveList.h"
#include "Components/Widget.h"
#include "UCustomCurveListUMG.generated.h"

UCLASS()
class UCustomCurveListUMG: public UWidget
{
	GENERATED_BODY()
public:
	UCustomCurveListUMG();
	
	//加载界面
	virtual TSharedRef<SWidget> RebuildWidget() override;
	//UMG列表栏
	virtual const FText GetPaletteCategory() ;
	
	//面板设置完毕后会触发此事件,字面的意思是同步属性
	virtual void SynchronizeProperties() override;
	//资源释放
	virtual void ReleaseSlateResources(bool bReleaseChildren) override;
	//更新信息
	
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void UpDataList(TMap<FString,FCustomCurveListInfo> ListData);
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "表格标题名字"))
	FString Title = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱一的名字"))
	FString OneInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱二的名字"))
	FString TwoInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱三的名字"))
	FString ThreeInfo = "";
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "柱四的名字"))
	FString CustomInfo = "";
	//表格主体
	TSharedPtr<SCustomCurveList> CustomCurveList;

	//显示标题
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示标题"))
	bool ShowTitle;
	//自定义的数值峰值
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "最大值"))
	int32 MaxValue;
	//区间
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "递增区间"))
	int32 GrowValue;
	//柱子的个数
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (ClampMin = 1, ClampMax = 4,DisplayName = "柱子个数"))
	int32 PillarNum = 1;
	//使用曲线
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "使用曲线"))
	bool UseCurveLine;
	//显示面积
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "显示面积"))
	bool ShowArea;
	//显示面积
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "使用随机数"))
	bool UseRand;
	//显示刻度尺
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "使用刻度尺"))
	bool UseRuler;
	
};
